﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using WeddingEventManagement_API;
using System.Web.Helpers;
using System.Web.Mvc;

namespace WeddingEventManagementApp.Models
{
    public class AutoCompleteLocations_VM
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
        public string City { get; set; }
        public string Province { get; set; }
    }

    public class Location_VM
    {
        public int LocationID { get; set; }

        [Required (ErrorMessage="Name is required")]
        [Display (Prompt="Location Name")]
        public string Name { get; set; }

        [Required (ErrorMessage="Street Address is Required")]
        [Display (Prompt="Street Address")]
        public string StreetAddress { get; set; }

        [Required (ErrorMessage="City is Required")]
        [Display(Prompt = "City")]
        public string City { get; set; }

        public List<string> AllUniqueCities { get; set; }

        [Required (ErrorMessage="Postal Code is Required")]
        [Display(Prompt = "Postal Code")]
        [RegularExpression("^[ABCEGHJKLMNPRSTVXY]{1}\\d{1}[A-Z]{1} *\\d{1}[A-Z]{1}\\d{1}$", ErrorMessage = "Must be a Valid Postal Code")]
        public string PostalCode { get; set; }

        [Required (ErrorMessage="Province is Required")]
        [Display(Prompt = "Province")]
        public Province Province { get; set; }

        public string ContactName { get; set; }

        [Phone]
        public string ContactPhone { get; set; }

        [EmailAddress]
        public string ContactEmail { get; set; }

        [Url]
        public string Website { get; set; }

        [DataType(DataType.MultilineText)]
        public string Notes { get; set; }

        public string Lat { get; set; }
        public string Lng { get; set; }
        public string Type { get; set; }
        public int Capacity { get; set; }
    }

    public class LocationMain_VM
    {
        public List<LocationOccurrence> MostUsed { get; set; }
        public List<Location> RecentlyViewed { get; set; }
    }

}